package com.entity;

import com.annotation.ColumnInfo;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.utils.DateUtil;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;


/**
 * 法制宣传
 *
 * @author
 * @email
 */
@TableName("xinlijiankang")
public class FazhixuanchuanEntity<T> implements Serializable {
    private static final long serialVersionUID = 1L;


    public FazhixuanchuanEntity() {

    }

    public FazhixuanchuanEntity(T t) {
        try {
            BeanUtils.copyProperties(this, t);
        } catch (IllegalAccessException | InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }


    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    @ColumnInfo(comment = "主键", type = "int(11)")
    @TableField(value = "id")

    private Integer id;


    /**
     * 咨询师
     */
    @ColumnInfo(comment = "咨询师", type = "int(11)")
    @TableField(value = "zhixunshi_id")

    private Integer zhixunshiId;


    /**
     * 法制宣传标题
     */
    @ColumnInfo(comment = "法制宣传标题", type = "varchar(200)")
    @TableField(value = "xinlijiankang_name")

    private String xinlijiankangName;


    /**
     * 法制宣传照片
     */
    @ColumnInfo(comment = "法制宣传照片", type = "varchar(200)")
    @TableField(value = "xinlijiankang_photo")

    private String xinlijiankangPhoto;


    /**
     * 法制宣传视频
     */
    @ColumnInfo(comment = "法制宣传视频", type = "varchar(200)")
    @TableField(value = "xinlijiankang_video")

    private String xinlijiankangVideo;


    /**
     * 法制宣传类型
     */
    @ColumnInfo(comment = "法制宣传类型", type = "int(11)")
    @TableField(value = "xinlijiankang_types")

    private Integer xinlijiankangTypes;


    /**
     * 数据类型
     */
    @ColumnInfo(comment = "数据类型", type = "int(11)")
    @TableField(value = "shuju_types")

    private Integer shujuTypes;


    /**
     * 赞
     */
    @ColumnInfo(comment = "赞", type = "int(11)")
    @TableField(value = "zan_number")

    private Integer zanNumber;


    /**
     * 踩
     */
    @ColumnInfo(comment = "踩", type = "int(11)")
    @TableField(value = "cai_number")

    private Integer caiNumber;


    /**
     * 逻辑删除
     */
    @ColumnInfo(comment = "逻辑删除", type = "int(11)")
    @TableField(value = "xinlijiankang_delete")

    private Integer xinlijiankangDelete;


    /**
     * 法制宣传详情
     */
    @ColumnInfo(comment = "法制宣传详情", type = "text")
    @TableField(value = "xinlijiankang_content")

    private String xinlijiankangContent;


    /**
     * 创建时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    @ColumnInfo(comment = "创建时间", type = "timestamp")
    @TableField(value = "create_time", fill = FieldFill.INSERT)

    private Date createTime;


    /**
     * 获取：主键
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置：主键
     */

    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取：咨询师
     */
    public Integer getZhixunshiId() {
        return zhixunshiId;
    }

    /**
     * 设置：咨询师
     */

    public void setZhixunshiId(Integer zhixunshiId) {
        this.zhixunshiId = zhixunshiId;
    }

    /**
     * 获取：法制宣传标题
     */
    public String getXinlijiankangName() {
        return xinlijiankangName;
    }

    /**
     * 设置：法制宣传标题
     */

    public void setXinlijiankangName(String xinlijiankangName) {
        this.xinlijiankangName = xinlijiankangName;
    }

    /**
     * 获取：法制宣传照片
     */
    public String getXinlijiankangPhoto() {
        return xinlijiankangPhoto;
    }

    /**
     * 设置：法制宣传照片
     */

    public void setXinlijiankangPhoto(String xinlijiankangPhoto) {
        this.xinlijiankangPhoto = xinlijiankangPhoto;
    }

    /**
     * 获取：法制宣传视频
     */
    public String getXinlijiankangVideo() {
        return xinlijiankangVideo;
    }

    /**
     * 设置：法制宣传视频
     */

    public void setXinlijiankangVideo(String xinlijiankangVideo) {
        this.xinlijiankangVideo = xinlijiankangVideo;
    }

    /**
     * 获取：法制宣传类型
     */
    public Integer getXinlijiankangTypes() {
        return xinlijiankangTypes;
    }

    /**
     * 设置：法制宣传类型
     */

    public void setXinlijiankangTypes(Integer xinlijiankangTypes) {
        this.xinlijiankangTypes = xinlijiankangTypes;
    }

    /**
     * 获取：数据类型
     */
    public Integer getShujuTypes() {
        return shujuTypes;
    }

    /**
     * 设置：数据类型
     */

    public void setShujuTypes(Integer shujuTypes) {
        this.shujuTypes = shujuTypes;
    }

    /**
     * 获取：赞
     */
    public Integer getZanNumber() {
        return zanNumber;
    }

    /**
     * 设置：赞
     */

    public void setZanNumber(Integer zanNumber) {
        this.zanNumber = zanNumber;
    }

    /**
     * 获取：踩
     */
    public Integer getCaiNumber() {
        return caiNumber;
    }

    /**
     * 设置：踩
     */

    public void setCaiNumber(Integer caiNumber) {
        this.caiNumber = caiNumber;
    }

    /**
     * 获取：逻辑删除
     */
    public Integer getXinlijiankangDelete() {
        return xinlijiankangDelete;
    }

    /**
     * 设置：逻辑删除
     */

    public void setXinlijiankangDelete(Integer xinlijiankangDelete) {
        this.xinlijiankangDelete = xinlijiankangDelete;
    }

    /**
     * 获取：法制宣传详情
     */
    public String getXinlijiankangContent() {
        return xinlijiankangContent;
    }

    /**
     * 设置：法制宣传详情
     */

    public void setXinlijiankangContent(String xinlijiankangContent) {
        this.xinlijiankangContent = xinlijiankangContent;
    }

    /**
     * 获取：创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置：创建时间
     */

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Xinlijiankang{" +
                ", id=" + id +
                ", zhixunshiId=" + zhixunshiId +
                ", xinlijiankangName=" + xinlijiankangName +
                ", xinlijiankangPhoto=" + xinlijiankangPhoto +
                ", xinlijiankangVideo=" + xinlijiankangVideo +
                ", xinlijiankangTypes=" + xinlijiankangTypes +
                ", shujuTypes=" + shujuTypes +
                ", zanNumber=" + zanNumber +
                ", caiNumber=" + caiNumber +
                ", xinlijiankangDelete=" + xinlijiankangDelete +
                ", xinlijiankangContent=" + xinlijiankangContent +
                ", createTime=" + DateUtil.convertString(createTime, "yyyy-MM-dd") +
                "}";
    }
}
